<!DOCTYPE html>
<html>

<head>
    <title>Example</title>

</head>

<body>
    <script type="text/javascript">
        // 获取文档信息，Document元数据
        document.writeln("<pre>");
        
        document.writeln("characterSet: " + document.characterSet);
        document.writeln("charset: " + document.charset);
        document.writeln("compatMode: " + document.compatMode);
        document.writeln("dir: " + document.dir);
        document.writeln("domain: " + document.domain);
        document.writeln("lastModified: " + document.lastModified);
        document.writeln("referrer: " + document.referrer);
        document.writeln("title: " + document.title);

        document.writeln("</pre>");
    </script>
</body>

</html>